<?php

namespace App\Http\Requests;

use App\Http\Requests\Request;

class StoreWeekmanageRequest extends Request
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'active_name'     =>  'required',
            'start_time'     =>  'required',
            'end_time'     =>  'required',
            'gift_name'     =>  'required',
            'gift_price'     =>  'required',
            'sort'     =>  'required',
            'one_reward'     =>  'required',
            'two_reward'     =>  'required',
            'three_reward'     =>  'required',
            'four_reward'     =>  'required',
            'five_reward'     =>  'required',
        ];
    }

    public function messages()
    {
        return [
            'active_name.required'    =>  '<i class=\'fa fa-times-circle-o\'></i>活动名称必填!&nbsp;',
            'start_time.required'    =>  '<i class=\'fa fa-times-circle-o\'></i>开始时间必填!&nbsp;',
            'end_time.required'    =>  '<i class=\'fa fa-times-circle-o\'></i>结束时间必填!&nbsp;',
            'gift_name.required'    =>  '<i class=\'fa fa-times-circle-o\'></i>礼物名称必填!&nbsp;',
            'gift_price.required'    =>  '<i class=\'fa fa-times-circle-o\'></i>礼物价格必填!&nbsp;',
            'sort.required'    =>  '<i class=\'fa fa-times-circle-o\'></i>礼物排序必填!&nbsp;',
            'one_reward.required'    =>  '<i class=\'fa fa-times-circle-o\'></i>第一名奖励必填!&nbsp;',
            'two_reward.required'    =>  '<i class=\'fa fa-times-circle-o\'></i>第二名奖励必填!&nbsp;',
            'three_reward.required'    =>  '<i class=\'fa fa-times-circle-o\'></i>第三名奖励必填!&nbsp;',
            'four_reward.required'    =>  '<i class=\'fa fa-times-circle-o\'></i>第四名奖励必填!&nbsp;',
            'five_reward.required'    =>  '<i class=\'fa fa-times-circle-o\'></i>第五名奖励必填!&nbsp;',
        ];
    }
}
